]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
sessionMode: Log mode changes
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 9 Aug 2022 10:52:58 +0000 (12:52 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 10 Aug 2022 16:31:42 +0000 (16:31 +0000)
Now that console.debug() makes it easy to log message with DEBUG
priority, we can be a lot more generous with logging without
spamming logs (by default).

Those turned out useful in figuring out the issue in the next
commit, so let's keep them.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2413>

js/ui/sessionMode.js

index c82e8329c9e0b4c35a6d6aca68f21e7332f5d853..d9dbdefc6b64f18a572028cdd8ab61e841eb7771 100644 (file)
@@ -158,6 +158,7 @@ var SessionMode = class extends Signals.EventEmitter {
     }
 
     pushMode(mode) {
+        console.debug(`sessionMode: Pushing mode ${mode}`);
         this._modeStack.push(mode);
         this._sync();
     }
@@ -165,6 +166,8 @@ var SessionMode = class extends Signals.EventEmitter {
     popMode(mode) {
         if (this.currentMode != mode || this._modeStack.length === 1)
             throw new Error("Invalid SessionMode.popMode");
+
+        console.debug(`sessionMode: Popping mode ${mode}`);
         this._modeStack.pop();
         this._sync();
     }